package com.beiji.lib.pen.model

import com.tqltech.tqlpencomm.bean.Dot
import java.io.Serializable

/**
 * 处理过的Dot
 * Created by X on 2018/6/14.
 */
data class DotUnit(
        var timestamp: Long = 0,
        var pageId: Int = -1,
        var bookId: Int = -1,
        var x: Float = -1f,
        var y: Float = -1f,
        var force: Float = 0F,
        var type: Dot.DotType = Dot.DotType.PEN_UP,
//        var color: Int = 0,
//        var index: Int = 0,
        var actionType: Int = PenStroke.ACTION_STROKE
) : Serializable {
    fun copy(): DotUnit {
        return DotUnit().also {
            it.force = force
            it.timestamp = timestamp
            it.pageId = pageId
            it.bookId = bookId
            it.x = x
            it.y = y
            it.type = type
            it.actionType = actionType
//            it.index = index
//            it.color = color
        }
    }
}